package cn.iocoder.yudao.module.crm.api.customer;

import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.crm.api.customer.dto.CrmCustomerDTO;
import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CrmCustomerApiImpl implements CrmCustomerApi{

    @Resource
    private CrmCustomerService crmCustomerService;

    @Override
    public CrmCustomerDTO getCustomerByCustomerId(Long customerId) {
        return BeanUtils.toBean(crmCustomerService.getCustomer(customerId), CrmCustomerDTO.class);
    }
}
